<?php

namespace App\Http\Requests\UserApi;

use App\Http\Requests\BaseRequest;
use Illuminate\Foundation\Http\FormRequest;

class WeChatTemplateRequest extends BaseRequest
{
    protected $rules = [

    ];
    //这里我只写了部分字段，可以定义全部字段
    protected $strings_key = [
        'team_id' => '队伍id',
        'activity_id' => '活动ID',
        //'company_id' => '公司ID',
    ];

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        $function = request()->route()->getAction();
        $rules = $this->rules;
        // 根据不同的情况, 添加不同的验证规则
        if ($function['controller'] == 'App\Http\Controllers\UserApi\WeChatTemplateController@wx_remind')
        {
            $rules=[
                //'company_id'=>'required|exists:company,id',
            ];

        }

        return $rules;

    }
}
